<?php

include('functions.php');

dbConnect();

if(isset($_GET['sql'])){
	
	$sql = stripslashes($_GET['sql']);
	
	$first = $_GET['first'];
	
	$sql = $sql . ' LIMIT ' . $first . ', 10';
	
	//echo $sql;
		
	$query = mysql_query($sql);

		$switch = "1"; 
		while($row = mysql_fetch_array($query)){

			if($switch=="1") { 

				$switch="0"; 
				echo '<div style="-moz-border-radius: 7px;border-radius:7px;margin-bottom:0px;padding-top:.5px;padding-bottom:.5px;border:1px solid #9CAA9C;margin-bottom:4px" id="result">'; 

			}
			else{ 

				$switch = "1"; 
				echo '<div style="-moz-border-radius: 7px;border-radius: 7px;margin-bottom:0px;padding-top:.5px;padding-bottom:.5px;border:1px solid #9CAA9C;margin-bottom:4px" id="result">'; 

				}

			include('post.php');
		}
		
		echo '';

}

?>